/*
 * @Author: cl
 * @Description:
 * @Date: 2022-09-07 09:15:11
 * @LastEditTime: 2022-11-04 09:04:48
 * @FilePath: \vue3\mock\index.js
 */
import Mock from "mockjs";
export default [
  {
    url: "/api/getRef",
    type: "get",
    timeout: 200,
    response: () => {
      let res = Mock.mock({
        "userInfo|5-10": [
          {
            // id 属性依次 +1
            "id|+1": 1,
            // 随机产生一个中文名 英文名为@name()
            name: "@cname()",
            // 在 16 - 22 间随机产生一个数作为年龄
            "age|16-22": 1,
            // 在数组中随机生成一个值作为性别
            "gender|1": ["male", "female"],
            // 随机产生一个数字作为成绩
            "score|40-100": 1,
            // 随机产生一个生日
            birthday: "@date()",
            // 随机生成一个 email 地址
            email: "@email()",
            // 随机生成一个地址，参数可添 true
            address: "@county()",
            // 随机生成一个手机号码，支持正则
            phoneNumber: /^1[3458]\d{9}$/,
          },
        ],
      });
      return res;
    },
  },
  {
    url: "/api/getReactive",
    type: "get",
    response: () => {
      return {
        // id 属性依次 +1
        "id|+1": 1,
        // 随机产生一个中文名 英文名为@name()
        name: "@cname()",
        // 在 16 - 22 间随机产生一个数作为年龄
        "age|16-22": 1,
        // 在数组中随机生成一个值作为性别
        "gender|1": ["male", "female"],
        // 随机产生一个数字作为成绩
        "score|40-100": 1,
        // 随机产生一个生日
        birthday: "@date()",
        // 随机生成一个 email 地址
        email: "@email()",
        // 随机生成一个地址，参数可添 true
        address: "@county()",
        // 随机生成一个手机号码，支持正则
        phoneNumber: /^1[3458]\d{9}$/,
      };
    },
  },
  {
    url: "/api/business/dispatchOrder/queryPageWithSaleFlow",
    type: "post",
    response: () => {
      return {
        data: {
          success: true,
          data: {
            // id 属性依次 +1
            "id|+1": 1,
            // 随机产生一个中文名 英文名为@name()
            name: "@cname()",
            // 在 16 - 22 间随机产生一个数作为年龄
            "age|16-22": 1,
            // 在数组中随机生成一个值作为性别
            "gender|1": ["male", "female"],
            // 随机产生一个数字作为成绩
            "score|40-100": 1,
            // 随机产生一个生日
            birthday: "@date()",
            // 随机生成一个 email 地址
            email: "@email()",
            // 随机生成一个地址，参数可添 true
            address: "@county()",
            // 随机生成一个手机号码，支持正则
            phoneNumber: /^1[3458]\d{9}$/,
          },
        },
      };
    },
  },
  {
    url: "/api/getDisplayConditionGroup",
    type: "get",
    response: () => {
      return {
        success: true,
        data: {
          headerVo: [
            {
              dbfield: "enterprise_short_name",
              name: "企业简称",
              priority: null,
            },
          ],
          isFold: 0,
          sortRtnVos: [
            {
              sortOp: "desc",
              sortPriority: 0,
              conditionCode: "update_time",
            },
          ],
          displayConditionRtnBeans: [
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myName",
              dictCode: null,
              width: 180,
              dbField: "myName",
              conditionName: "名称",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
            {
              comboboxType: null,
              childrenOptions: null,
              field: "myAge",
              dictCode: null,
              width: 180,
              dbField: "myAge",
              conditionName: "年龄",
              conditionType: "TEXT",
              serviceName: null,
              operation: "like",
            },
          ],
        },
      };
    },
  },
];
